home *** CD-ROM | disk | FTP | other *** search
- Path: news.iastate.edu!usenet
- From: Steve Lee <sjlee@iastate.edu>
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Performance: C vs. C++
- Date: Fri, 12 Jan 1996 11:46:52 -0800
- Organization: Iowa State University
- Message-ID: <30F6BAAC.12B5@iastate.edu>
- NNTP-Posting-Host: dial22.ppp.iastate.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b4a (Win16; I)
-
- Hi,
-
- I was wondering if anyone could tell me what the difference in performance would be between
- writing a program in C++ vs. C. Assume that the compilers are both of equal quality. I know
- that certain features such as virtual functions and exception handling add overhead. Are there
- any others? If you don't implement these features that add the extra overhead, is C++ directly
- comparable to C in performance then? The only other reason I could see C++ being slower than C
- is programming style. Object-oriented is slower since there are more layers, hence function call
- overhead.
-
- Anyone with some answers, disagreements? Thanks.
-
- --
- Steve Lee
- Computer Engineering/Computer Science
- Iowa State University
- email -> sjlee@iastate.edu
- WWW -> http://www.cs.iastate.edu/~sjlee/homepage.html
-